package cn.com.yusp.trace.apply;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ApplyController {

//    private final static Logger logger = LoggerFactory.getLogger("Application_ERROR");
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private ApplyFeignUserApi serverFeignUserApi;
  /*  @Autowired
    private ServerFeignGoodsApi serverFeignGoodsApi;*/

    @GetMapping("/apply")
    public String selectApplyData() {
        logger.info("微服务user调用开始--------ServerController中selectApplyData开始执行--------!");
        String user = serverFeignUserApi.selectUserFromDB();
        logger.info("微服务user调用结束--------中selectApplyData查询出数据为："+user);
       
        return "【user信息为：】"+user;
    }
    
    @GetMapping("/test")
    public String test() {       
        return "apply";
    }
}